package aynu.hd.Hotel.Dao;

import aynu.hd.pojo.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface orderDao {
    //新增订单
    Integer addOrders(Orders orders);

    //根据id修改订单状态
    void updateStateById(@Param("order_id") String order_id, @Param("state") String state);

    //根据用户id查找所有未付款的订单信息
    List<Orders> queryOrderByUserId(@Param("user_id") Integer user_id, @Param("state") String state);

    //根据id删除订单
    void deleteOrderById(Integer orders_id);

    //根据id查找订单信息
    Orders queryOrderById(Integer orders_id);
}
